<!--
 * @Author: shy_didi
 * @Date: 2020-06-10 12:03:08
 * @LastEditTime: 2020-06-10 15:54:47
 * @LastEditors: Please set LastEditors
 * @Description: 评委导师
 * @FilePath: \发明人\fmr\src\pages\home\components\JMethator.vue
--> 
<template>
  <div class="judge-mentor">
    <div class="title">
      <p class="eng">JUDGE MENTOR</p>
      <p class="chi">评委导师</p>
    </div>
    <ul class="ul-content">
      <li class="li-content" v-for="item of datas.slice(0,4)" :key="item.id">
        <div class="left">
          <van-image  :src="item.cover" />
        </div>
        <div class="right">
          <p class="name">{{item.name}}</p>
          <p class="company">
            {{item.company+" "+item.job}}
          </p>
          <p class="content">{{item.content}}</p>
        </div>
      </li>
    </ul>
    <div class="more">
      <van-button class="button"  to="/news">更多导师</van-button>
    </div>
  </div>
</template>

<script>
import * as api from "@/request/api/apiList/compete.js"
export default {
  data(){
    return{
      datas:[]  //评委导师数据
    }
  },
  methods:{
    async API_tutor(id,name,company,job,cover,content){
      let result = {
        id,
        name,
        company,
        job,
        cover,
        content
      }
      return await api.tutor(result)
    }
  },
  async created(){
    let res = await this.API_tutor()
    //console.log(res)
    if(res.data.code === 200){
      this.datas = res.data.data.data
      this.datas.reverse()
    }
    //console.log(this.datas)
  }
};
</script>

<style lang="scss" scoped>
@import "@/style/home.scss"
</style>